﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Model.Models.Segmento>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2><center>Lista de segmentos<center/></h2>
<table>
    <tr>
        
        <th>
            Nome da empresa
        </th>
        <th>
            Descrição
        </th>
        <th>Opções</th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        
         <%--   <%: Html.DisplayFor(modelItem => item.Id_Segmento) %>
        --%>
        <td>
            <%: Html.DisplayFor(modelItem => item.NomeEmpresa) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Descricao) %>
        </td>
        <td>
            <%: Html.ActionLink("Editar", "Edit", new {  id=item.Id_Segmento }) %> |
            <%: Html.ActionLink("Deletar", "Delete", new {  id=item.Id_Segmento }) %>
        </td>
    </tr>
<% } %>

</table>
<p>
    <%: Html.ActionLink("Cadastrar segmento", "Create") %>
</p>
</asp:Content>
